# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pdfresurrect
pkgver=0.12
pkgrel=3
groups=('blackarch' 'blackarch-forensic')
pkgdesc='A tool aimed at analyzing PDF documents.'
arch=('x86_64' 'aarch64')
url='http://packetstormsecurity.com/files/118459/PDFResurrect-PDF-Analyzer-0.12.html'
license=('GPL3')
makedepends=('gzip')
source=("https://dl.packetstormsecurity.net/forensics/$pkgname-v${pkgver/./_}.tar.gz")
sha512sums=('6a832d4675086ba4ebcdbc31f868e500717085a727b7d8ce536ab9c00104f66d11c54bc37f0bc67e21d1f29a7d22140afc4ab868481457a1186a7c02cb3b04d5')

build() {
  cd "$pkgname-v${pkgver/./_}"

  ./configure --prefix=/usr

  make
}

package() {
  cd "$pkgname-v${pkgver/./_}"

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README AUTHORS \
    ChangeLog
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm 644 "$pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1"
}

